A data abstraction layer (“DAL”) effects communication between two disparate software modules. In the environment of the present invention, a DAL provides an interface between the application programming interface (“API”) of an object-oriented database management system (or “OODBMS”), such as OSMOS, which is available from the assignee hereof and a relational database management system (or “RDBMS”).
Each time a client application instantiates an object in the object-oriented database, a new OID (Object Identifier) must be assigned to the object. An OID is a unique number pair used to identify a particular object. The number pair comprises the class number of the object and an object number. The smallest unassigned object number for each class is stored within a table (OIDGEN) in the relational database. When a request to generate an OID comes in, the smallest unassigned object number for a particular class within the OIDGEN table is incremented by a constant value. This constant value and the new high value are returned to the request task, which then gains rights to all OID's between the previous smallest OID and the new smallest unassigned OID. This insures that every instantiated object is uniquely identified.
As the smallest unassigned object number for a class is incremented, the OIDGEN table entry for that class is locked. While the OIDGEN table entry is locked, any subsequent requests for generating an OID of this class are not permitted. Instead, subsequent requests are queued until the user application commits its current transaction. Since the request to generate an OID is tied with the rest of the user application's transaction, the OIDGEN table entry is not released until the application completes its transaction. Although generating an OID itself does not take long, a request to generate an OID cannot complete until all previous instantiations of the same class are complete, which does take a long time.